package se.hiq.wineo.client.events;

import se.hiq.wineo.shared.data.WineDetails;

import com.google.gwt.event.shared.GwtEvent;

public class WineSelectedEvent extends GwtEvent<WineSelectedEventHandler> {
	public static Type<WineSelectedEventHandler> TYPE = new Type<WineSelectedEventHandler>();

	private final WineDetails wine;
	
	public WineSelectedEvent(WineDetails wine) {
		this.wine = wine;
	}
	
	@Override
	protected void dispatch(WineSelectedEventHandler handler) {
		handler.onWineSelected(wine);
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<WineSelectedEventHandler> getAssociatedType() {
		return TYPE;
	}

}
